Skip to content

Conversation

@pcrespov
Copy link
Member

@pcrespov pcrespov commented May 20, 2025

What do these changes do?

This first pull request introduces significant updates to the database schema, data models, and utility functions to support a new workflow for user pre-registration and account request statuses.

  • 🎨 Extends user's pre-registration table to account for new pre-registration workflow
    • id: primary-key
    • Account request information
      • account_request_status: PENDING, APPROVED, REJECTED
      • account_request_reviewed_by: who
      • account_request_reviewed_at: when
      • product_name: Product that the user is requesting an account for, i.e. same user can make one request per product
  • ♻️ Upgrades calls to asyncpg used functions both in simcore-postgers-database package as in simcore-service-web-server
  • βœ… Adds new tests to users_repository

Related issue/s

  • First part of ITISFoundation/private-issues#69

How to test

cd packages/postgres-database
make install-dev
pytest -vv tests/test_*users*.py
cd services/web/server
make install-dev
pytest -vv tests/unit/with_dbs/**/test_*users*.py
pytest -vv tests/unit/with_dbs/**/test_*login*.py

Dev-ops

None

@codecov
Copy link

codecov bot commented May 20, 2025

Codecov Report

Attention: Patch coverage is 87.09677% with 4 lines in your changes missing coverage. Please review.

Project coverage is 87.39%. Comparing base (00e6733) to head (7b56d82).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7709      +/-   ##
==========================================
+ Coverage   87.19%   87.39%   +0.19%     
==========================================
  Files        1839     1832       -7     
  Lines       71081    70899     -182     
  Branches     1203     1203              
==========================================
- Hits        61981    61959      -22     
+ Misses       8772     8612     -160     
  Partials      328      328              
Flag Coverage Ξ”
integrationtests 64.48% <42.85%> (+0.10%) ⬆️
unittests 86.60% <87.09%> (+0.19%) ⬆️
Components Coverage Ξ”
api βˆ… <ΓΈ> (βˆ…)
pkg_aws_library 93.92% <ΓΈ> (ΓΈ)
pkg_dask_task_models_library 79.47% <ΓΈ> (ΓΈ)
pkg_models_library 93.08% <ΓΈ> (ΓΈ)
pkg_notifications_library 85.26% <ΓΈ> (ΓΈ)
pkg_postgres_database 88.61% <66.66%> (+0.03%) ⬆️
pkg_service_integration 69.92% <ΓΈ> (ΓΈ)
pkg_service_library 72.30% <ΓΈ> (ΓΈ)
pkg_settings_library 90.90% <ΓΈ> (ΓΈ)
pkg_simcore_sdk 84.95% <ΓΈ> (-0.12%) ⬇️
agent 96.46% <ΓΈ> (ΓΈ)
api_server 91.59% <ΓΈ> (ΓΈ)
autoscaling 96.07% <ΓΈ> (ΓΈ)
catalog 92.70% <ΓΈ> (ΓΈ)
clusters_keeper 99.25% <ΓΈ> (ΓΈ)
dask_sidecar 91.67% <ΓΈ> (+12.42%) ⬆️
datcore_adapter 98.12% <ΓΈ> (ΓΈ)
director 76.78% <ΓΈ> (ΓΈ)
director_v2 91.06% <ΓΈ> (+0.04%) ⬆️
dynamic_scheduler 96.76% <ΓΈ> (ΓΈ)
dynamic_sidecar 90.18% <ΓΈ> (ΓΈ)
efs_guardian 89.79% <ΓΈ> (ΓΈ)
invitations 93.28% <ΓΈ> (ΓΈ)
payments 92.63% <ΓΈ> (ΓΈ)
resource_usage_tracker 89.02% <ΓΈ> (ΓΈ)
storage 87.56% <ΓΈ> (ΓΈ)
webclient βˆ… <ΓΈ> (βˆ…)
webserver 85.63% <90.47%> (+0.02%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data
Powered by Codecov. Last update 00e6733...7b56d82. Read the comment docs.

πŸš€ New features to boost your workflow:
  • πŸ“¦ JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pcrespov pcrespov self-assigned this May 20, 2025
@pcrespov pcrespov added a:webserver webserver's codebase. Assigning the area is particularly useful for bugs a:database associated to postgres service and postgres-database package labels May 20, 2025
@pcrespov pcrespov added this to the Bazinga! milestone May 20, 2025
@pcrespov pcrespov force-pushed the is69/pre-registration-table branch from 809eb98 to c93737e Compare May 21, 2025 08:36
@pcrespov pcrespov changed the title 🎨 Is69/pre registration table 🎨 database+web-server: Extending user pre-registration workflow and asyncpg upgrades πŸ—ƒοΈ May 21, 2025
@pcrespov pcrespov force-pushed the is69/pre-registration-table branch from c93737e to b228936 Compare May 21, 2025 08:45
@pcrespov pcrespov marked this pull request as ready for review May 21, 2025 08:45
@pcrespov pcrespov enabled auto-merge (squash) May 21, 2025 08:45
@pcrespov
Copy link
Member Author

@mergify queue

@mergify
Copy link
Contributor

mergify bot commented May 21, 2025

queue

🟠 Waiting for conditions to match

  • -closed [πŸ“Œ queue requirement]
  • any of: [πŸ”€ queue conditions]
    • all of: [πŸ“Œ queue conditions of queue default]
      • branch-protection-review-decision = APPROVED [πŸ›‘ GitHub branch protection]
      • any of: [πŸ›‘ GitHub branch protection]
        • check-neutral = system-tests
        • check-skipped = system-tests
        • check-success = system-tests
      • #approved-reviews-by >= 2 [πŸ›‘ GitHub branch protection]
      • #approved-reviews-by>=2
      • #changes-requested-reviews-by = 0 [πŸ›‘ GitHub branch protection]
      • #changes-requested-reviews-by=0
      • #review-threads-unresolved = 0 [πŸ›‘ GitHub branch protection]
      • #review-threads-unresolved=0
      • -conflict
      • -draft
      • base=master
      • label!=πŸ€–-do-not-merge
      • label=πŸ€–-automerge
      • any of: [πŸ›‘ GitHub branch protection]
        • check-skipped = deploy to dockerhub
        • check-neutral = deploy to dockerhub
        • check-success = deploy to dockerhub
      • any of: [πŸ›‘ GitHub branch protection]
        • check-success = unit-tests
        • check-neutral = unit-tests
        • check-skipped = unit-tests
      • any of: [πŸ›‘ GitHub branch protection]
        • check-success = check OAS' are up to date
        • check-neutral = check OAS' are up to date
        • check-skipped = check OAS' are up to date
      • any of: [πŸ›‘ GitHub branch protection]
        • check-success = integration-tests
        • check-neutral = integration-tests
        • check-skipped = integration-tests
      • any of: [πŸ›‘ GitHub branch protection]
        • check-success = build-test-images (frontend) / build-test-images
        • check-neutral = build-test-images (frontend) / build-test-images
        • check-skipped = build-test-images (frontend) / build-test-images
  • -conflict [πŸ“Œ queue requirement]
  • -draft [πŸ“Œ queue requirement]
  • any of: [πŸ“Œ queue -> configuration change requirements]
    • -mergify-configuration-changed
    • check-success = Configuration changed

@pcrespov pcrespov requested a review from odeimaiz May 21, 2025 08:46
Copy link
Collaborator

@matusdrobuliak66 matusdrobuliak66 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

Copy link
Member

@sanderegg sanderegg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very cool, thanks!

Copy link
Contributor

@GitHK GitHK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, maybe ask copilot for a review to check typos (I randomly spotted an easy one)

@pcrespov pcrespov added the πŸ€–-automerge marks PR as ready to be merged for Mergify label May 21, 2025
@pcrespov pcrespov disabled auto-merge May 21, 2025 12:48
@pcrespov pcrespov merged commit 501de76 into ITISFoundation:master May 21, 2025
39 of 40 checks passed
@sonarqubecloud
Copy link

@pcrespov pcrespov deleted the is69/pre-registration-table branch May 21, 2025 12:56
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Jun 6, 2025
92 tasks
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Aug 5, 2025
88 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

πŸ€–-automerge marks PR as ready to be merged for Mergify a:database associated to postgres service and postgres-database package a:webserver webserver's codebase. Assigning the area is particularly useful for bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants